﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HttpTaskManage.ModelEntityConfiguration
{
    public class DomainConfigEntityConfiguration : EntityTypeConfiguration<DomainConfig>
    {
        public DomainConfigEntityConfiguration()
        {
            this.HasKey(x => x.Id);
            this.HasMany(x => x.TerminalServers)
                .WithMany(x => x.DomainConfigs)
                .Map(x => x.ToTable("TerminalDomainServer")
                .MapLeftKey("IP")
                .MapRightKey("Domain"));


        }
    }
}
